#include <iostream>
#include "httplib.h"

#define Serverip "120.26.46.38" 
#define Serverport 8080

int main()
{
    httplib::Client client(Serverip,Serverport);  //构建客户端对象
    
    httplib::MultipartFormData item; //创建文件对象
    item.name = "file";
    item.filename = "hello.txt";
    item.content = "hello world!";
    item.content_type = "text/plain";

    httplib::MultipartFormDataItems items; //管理文件对象
    items.push_back(item);

    auto res = client.Post("/multipart",items); //将文件上传到服务器，返回服务器处理结果
    std::cout<<res->status<<std::endl;
    std::cout<<res->body<<std::endl;
    
    return 0;
}